home *** CD-ROM | disk | FTP | other *** search
- unit Rsltform;
-
- interface
-
- uses
- SysUtils, Windows, Messages, Classes, Graphics, Controls,
- StdCtrls, Forms, DBCtrls, DB, DBGrids, DBTables, Buttons, Grids, ExtCtrls,
- Dialogs;
-
- type
- TResultForm = class(TForm)
- DBGrid1: TDBGrid;
- DBNavigator: TDBNavigator;
- Panel1: TPanel;
- DataSource1: TDataSource;
- Panel2: TPanel;
- Panel3: TPanel;
- Query1: TQuery;
- SpeedButton2: TSpeedButton;
- Panel4: TPanel;
- SpeedButton1: TSpeedButton;
- procedure SpeedButton1Click(Sender: TObject);
- procedure SpeedButton2Click(Sender: TObject);
- end;
-
- var
- ResultForm: TResultForm;
-
- implementation
-
- {$R *.DFM}
-
- procedure TResultForm.SpeedButton1Click(Sender: TObject);
- begin
- Close;
- end;
-
- procedure TResultForm.SpeedButton2Click(Sender: TObject);
- var
- strText: string; { Variable to hold display text }
- iCounter: Integer; { Loop counter variable }
- begin
-
- { Build a string containing the query }
-
- strText := '';
- for iCounter := 0 to Query1.SQL.Count - 1 do
- strText := strText + Query1.SQL[iCounter];
-
- { Display the query text }
-
- MessageDlg('The underlying query is: ' + #10 + #10 + strText,
- mtInformation, [mbOK], 0 );
- end;
-
- end.